# -*-coding:utf-8 -*-
'''
@author cjgong
@desc 
'''
from django.db.models import QuerySet

from app01.models import TStudent


class UserService:
    '''
     参数;
      p_user_name 用户名
      p_user_password 密码
     返回值：
     表示匹配到记录数
    '''
    @staticmethod
    def  finduserbynameandpassword(p_user_name,p_user_password):
        v_query:QuerySet=TStudent.objects
        v_query:QuerySet=v_query.filter(stuid=p_user_name).filter(stuname=p_user_password)
        v_reuslt=v_query.count()
        return v_reuslt
    pass
